GetStylScrap
GetStylScrap Copy styles of selection; obtains handle to StScrpRec
#include <TextEdit.h> TextEdit
TEHandle hTE ; edit record of interest
returns handle leading to a StScrpRec (or NIL)
GetStylScrp allocates an StScrpRec, copies style-related data from the
current selection range into it, and returns a handle to that copied data. Use
this function to duplicate the styles associated with selected text.
hTE is a handle leading to an edit record created via TENew or
Returns: StScrpHandle; a handle to a copy of the StScrpRec structure which
applies to the current selection range of hTE. If hTE is an
old-format edit record, then no data is allocated and the return value
is NIL (0). Prior to System 6.0, this also returned 0 when the
selection range was an insertion point.

Notes: GetStylScrap provides a way to copy style-related
information about a range of text. Use this call to obtain a value for
hStScrap before calling TEStylInsert or for use in a call to
Use DisposHandle to free up the memory occupied by the newly- created